Bug 552153 – GtkModules loading with XSettings doesn't work if the
authorCosimo Cecchi <cosimoc@gnome.org>
Sat, 13 Sep 2008 19:01:13 +0000 (19:01 +0000)
committerCosimo Cecchi <cosimoc@src.gnome.org>
Sat, 13 Sep 2008 19:01:13 +0000 (19:01 +0000)
2008-09-13  Cosimo Cecchi  <cosimoc@gnome.org>

Bug 552153 – GtkModules loading with XSettings doesn't work if the
GTK_MODULES env var isn't set.

* gtk/gtkmain.c: (do_post_parse_initialization):
* gtk/gtkmodules.c: (_gtk_modules_init):
Call _gtk_modules_init () even if gtk_modules_string is NULL, so
that GtkModules specified with XSettings could be loaded.

svn path=/trunk/; revision=21380

ChangeLog
gtk/gtkmain.c
gtk/gtkmodules.c

index 3e6fb8a6a255b1a7e660f1ed4bdcd42011c2e638..b3ad4e4ee38546419ebdc06912b1c1cdcdb1ff0d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2008-09-13  Cosimo Cecchi  <cosimoc@gnome.org>
+
+       Bug 552153 – GtkModules loading with XSettings doesn't work if the
+       GTK_MODULES env var isn't set.
+
+       * gtk/gtkmain.c: (do_post_parse_initialization):
+       * gtk/gtkmodules.c: (_gtk_modules_init):
+       Call _gtk_modules_init () even if gtk_modules_string is NULL, so
+       that GtkModules specified with XSettings could be loaded.
+
 2008-09-13  Tor Lillqvist  <tml@novell.com>
 
        * gtk/gtkmain.c: Do as the docs for
index 52538a1db38158ea702049b42bad7702a3607c7b..cb2929eb82cb4b4425e9afc9fb6edb49e41e3aba 100644 (file)
@@ -699,6 +699,10 @@ do_post_parse_initialization (int    *argc,
       _gtk_modules_init (argc, argv, gtk_modules_string->str);
       g_string_free (gtk_modules_string, TRUE);
     }
+  else
+    {
+      _gtk_modules_init (argc, argv, NULL);
+    }
 }
 
 
index 0cac9634f47021550574e8ea8a1aeb7a61f51365..764013f97ed278a4793c72819ebe822ac3a76a72 100644 (file)
@@ -511,11 +511,13 @@ _gtk_modules_init (gint        *argc,
                    G_CALLBACK (display_opened_cb), 
                    NULL);
 
-  /* Modules specified in the GTK_MODULES environment variable
-   * or on the command line are always loaded, so we'll just leak 
-   * the refcounts.
-   */
-  g_slist_free (load_modules (gtk_modules_args));
+  if (gtk_modules_args) {
+    /* Modules specified in the GTK_MODULES environment variable
+     * or on the command line are always loaded, so we'll just leak 
+     * the refcounts.
+     */
+    g_slist_free (load_modules (gtk_modules_args));
+  }
 }
 
 static void